Optimal. Leaf size=133 \[ \frac {35 \tanh ^{-1}(\sin (c+d x))}{8 a^4 d}+\frac {35 \sec (c+d x) \tan (c+d x)}{8 a^4 d}+\frac {35 \sec ^3(c+d x) \tan (c+d x)}{12 a^4 d}-\frac {2 i \sec ^7(c+d x)}{a d (a+i a \tan (c+d x))^3}-\frac {14 i \sec ^5(c+d x)}{3 d \left (a^4+i a^4 \tan (c+d x)\right )} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.10, antiderivative size = 133, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 3, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {3581, 3853,
3855} \begin {gather*} \frac {35 \tanh ^{-1}(\sin (c+d x))}{8 a^4 d}-\frac {14 i \sec ^5(c+d x)}{3 d \left (a^4+i a^4 \tan (c+d x)\right )}+\frac {35 \tan (c+d x) \sec ^3(c+d x)}{12 a^4 d}+\frac {35 \tan (c+d x) \sec (c+d x)}{8 a^4 d}-\frac {2 i \sec ^7(c+d x)}{a d (a+i a \tan (c+d x))^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 3581
Rule 3853
Rule 3855
Rubi steps
\begin {align*} \int \frac {\sec ^9(c+d x)}{(a+i a \tan (c+d x))^4} \, dx &=-\frac {2 i \sec ^7(c+d x)}{a d (a+i a \tan (c+d x))^3}+\frac {7 \int \frac {\sec ^7(c+d x)}{(a+i a \tan (c+d x))^2} \, dx}{a^2}\\ &=-\frac {2 i \sec ^7(c+d x)}{a d (a+i a \tan (c+d x))^3}-\frac {14 i \sec ^5(c+d x)}{3 d \left (a^4+i a^4 \tan (c+d x)\right )}+\frac {35 \int \sec ^5(c+d x) \, dx}{3 a^4}\\ &=\frac {35 \sec ^3(c+d x) \tan (c+d x)}{12 a^4 d}-\frac {2 i \sec ^7(c+d x)}{a d (a+i a \tan (c+d x))^3}-\frac {14 i \sec ^5(c+d x)}{3 d \left (a^4+i a^4 \tan (c+d x)\right )}+\frac {35 \int \sec ^3(c+d x) \, dx}{4 a^4}\\ &=\frac {35 \sec (c+d x) \tan (c+d x)}{8 a^4 d}+\frac {35 \sec ^3(c+d x) \tan (c+d x)}{12 a^4 d}-\frac {2 i \sec ^7(c+d x)}{a d (a+i a \tan (c+d x))^3}-\frac {14 i \sec ^5(c+d x)}{3 d \left (a^4+i a^4 \tan (c+d x)\right )}+\frac {35 \int \sec (c+d x) \, dx}{8 a^4}\\ &=\frac {35 \tanh ^{-1}(\sin (c+d x))}{8 a^4 d}+\frac {35 \sec (c+d x) \tan (c+d x)}{8 a^4 d}+\frac {35 \sec ^3(c+d x) \tan (c+d x)}{12 a^4 d}-\frac {2 i \sec ^7(c+d x)}{a d (a+i a \tan (c+d x))^3}-\frac {14 i \sec ^5(c+d x)}{3 d \left (a^4+i a^4 \tan (c+d x)\right )}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 1.31, size = 237, normalized size = 1.78 \begin {gather*} -\frac {\sec ^4(c+d x) \left (896 i \cos (c+d x)+3 \left (128 i \cos (3 (c+d x))+105 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )+35 \cos (4 (c+d x)) \log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )+140 \cos (2 (c+d x)) \left (\log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )-\log \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )\right )-105 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )-35 \cos (4 (c+d x)) \log \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )+42 \sin (c+d x)+58 \sin (3 (c+d x))\right )\right )}{192 a^4 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.30, size = 170, normalized size = 1.28
method | result | size |
risch | \(-\frac {i \left (105 \,{\mathrm e}^{7 i \left (d x +c \right )}+385 \,{\mathrm e}^{5 i \left (d x +c \right )}+511 \,{\mathrm e}^{3 i \left (d x +c \right )}+279 \,{\mathrm e}^{i \left (d x +c \right )}\right )}{12 d \,a^{4} \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{4}}+\frac {35 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{8 a^{4} d}-\frac {35 \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{8 a^{4} d}\) | \(111\) |
derivativedivides | \(\frac {\frac {2 \left (\frac {1}{4}-\frac {2 i}{3}\right )}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{3}}+\frac {2 \left (-\frac {25}{16}-i\right )}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{2}}+\frac {2 \left (-\frac {27}{16}+3 i\right )}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1}+\frac {1}{4 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{4}}-\frac {35 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{8}+\frac {2 \left (\frac {25}{16}-i\right )}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{2}}+\frac {2 \left (\frac {1}{4}+\frac {2 i}{3}\right )}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{3}}+\frac {2 \left (-\frac {27}{16}-3 i\right )}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1}-\frac {1}{4 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{4}}+\frac {35 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{8}}{a^{4} d}\) | \(170\) |
default | \(\frac {\frac {2 \left (\frac {1}{4}-\frac {2 i}{3}\right )}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{3}}+\frac {2 \left (-\frac {25}{16}-i\right )}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{2}}+\frac {2 \left (-\frac {27}{16}+3 i\right )}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1}+\frac {1}{4 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{4}}-\frac {35 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{8}+\frac {2 \left (\frac {25}{16}-i\right )}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{2}}+\frac {2 \left (\frac {1}{4}+\frac {2 i}{3}\right )}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{3}}+\frac {2 \left (-\frac {27}{16}-3 i\right )}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1}-\frac {1}{4 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{4}}+\frac {35 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{8}}{a^{4} d}\) | \(170\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Both result and optimal contain complex but leaf count of result is larger than
twice the leaf count of optimal. 295 vs. \(2 (117) = 234\).
time = 0.31, size = 295, normalized size = 2.22 \begin {gather*} -\frac {\frac {2 \, {\left (\frac {81 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {544 i \, \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} - \frac {105 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + \frac {480 i \, \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}} - \frac {105 \, \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}} - \frac {96 i \, \sin \left (d x + c\right )^{6}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{6}} + \frac {81 \, \sin \left (d x + c\right )^{7}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{7}} + 160 i\right )}}{a^{4} - \frac {4 \, a^{4} \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {6 \, a^{4} \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}} - \frac {4 \, a^{4} \sin \left (d x + c\right )^{6}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{6}} + \frac {a^{4} \sin \left (d x + c\right )^{8}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{8}}} - \frac {105 \, \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + 1\right )}{a^{4}} + \frac {105 \, \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - 1\right )}{a^{4}}}{24 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.37, size = 230, normalized size = 1.73 \begin {gather*} \frac {105 \, {\left (e^{\left (8 i \, d x + 8 i \, c\right )} + 4 \, e^{\left (6 i \, d x + 6 i \, c\right )} + 6 \, e^{\left (4 i \, d x + 4 i \, c\right )} + 4 \, e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right )} \log \left (e^{\left (i \, d x + i \, c\right )} + i\right ) - 105 \, {\left (e^{\left (8 i \, d x + 8 i \, c\right )} + 4 \, e^{\left (6 i \, d x + 6 i \, c\right )} + 6 \, e^{\left (4 i \, d x + 4 i \, c\right )} + 4 \, e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right )} \log \left (e^{\left (i \, d x + i \, c\right )} - i\right ) - 210 i \, e^{\left (7 i \, d x + 7 i \, c\right )} - 770 i \, e^{\left (5 i \, d x + 5 i \, c\right )} - 1022 i \, e^{\left (3 i \, d x + 3 i \, c\right )} - 558 i \, e^{\left (i \, d x + i \, c\right )}}{24 \, {\left (a^{4} d e^{\left (8 i \, d x + 8 i \, c\right )} + 4 \, a^{4} d e^{\left (6 i \, d x + 6 i \, c\right )} + 6 \, a^{4} d e^{\left (4 i \, d x + 4 i \, c\right )} + 4 \, a^{4} d e^{\left (2 i \, d x + 2 i \, c\right )} + a^{4} d\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \frac {\int \frac {\sec ^{9}{\left (c + d x \right )}}{\tan ^{4}{\left (c + d x \right )} - 4 i \tan ^{3}{\left (c + d x \right )} - 6 \tan ^{2}{\left (c + d x \right )} + 4 i \tan {\left (c + d x \right )} + 1}\, dx}{a^{4}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.84, size = 151, normalized size = 1.14 \begin {gather*} \frac {\frac {105 \, \log \left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1\right )}{a^{4}} - \frac {105 \, \log \left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1\right )}{a^{4}} - \frac {2 \, {\left (81 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 96 i \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{6} - 105 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 480 i \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 105 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 544 i \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 81 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 160 i\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )}^{4} a^{4}}}{24 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 6.87, size = 197, normalized size = 1.48 \begin {gather*} \frac {35\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{4\,a^4\,d}+\frac {\frac {35\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{4\,a^4}+\frac {35\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5}{4\,a^4}-\frac {27\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7}{4\,a^4}-\frac {27\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{4\,a^4}+\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,136{}\mathrm {i}}{3\,a^4}-\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,40{}\mathrm {i}}{a^4}+\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6\,8{}\mathrm {i}}{a^4}-\frac {40{}\mathrm {i}}{3\,a^4}}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8-4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+6\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4-4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________